<template>
  <div class="list-page">
    <a-spin :spinning="loading">
      <div class="top-active">
        <div class="top-search">
          <a-input-search
            placeholder="请输入内容"
            enter-button="搜索"
            @search="search"
          />
        </div>
      </div>
      <div class="table-box">
        <a-table
          :columns="columns"
          :data-source="source"
          bordered
          :rowKey="(record, index) => index"
        >
          <a slot="history" slot-scope="text">{{ text }}</a>
          <a slot="bz" href="http://dark.childstore.cn/annotations.html"
            >标注</a
          >
        </a-table>
      </div>
    </a-spin>
  </div>
</template>

<script>
export default {
  name: "home",
  data() {
    return {
      loading: false,
      columns: [
        {
          title: "印谱名称",
          dataIndex: "name",
          key: "name",
        },
        {
          title: "作者",
          dataIndex: "author",
          key: "author",
        },
        {
          title: "年份",
          dataIndex: "year",
          key: "year",
        },
        {
          title: "版本",
          dataIndex: "vision",
          key: "vision",
        },
        {
          title: "资源来源",
          dataIndex: "source",
          key: "source",
        },
        {
          title: "印谱简介",
          dataIndex: "des",
          key: "des",
        },
        {
          title: "标注",
          dataIndex: "bz",
          key: "bz",
          scopedSlots: { customRender: "bz" },
        },
      ],
      source: [
        {
          id: 12430,
          name: "名称",
          des: "印谱简介印谱简介印谱简介印谱简介印谱简介印谱简介",
          history: "0215415",
          author: "张三",
          year: "1940",
          vision: "鈐印本",
          source: "松蔭軒藏印譜文獻",
          view: "/pic/1.png",
        },
        {
          id: 12431,
          name: "名称",
          des: "印谱简介印谱简介印谱简介印谱简介印谱简介印谱简介",
          history: "0215415",
          author: "张三",
          year: "1940",
          vision: "鈐印本",
          source: "松蔭軒藏印譜文獻",
          view: "/pic/1.png",
        },
        {
          id: 12432,
          name: "名称",
          des: "印谱简介印谱简介印谱简介印谱简介印谱简介印谱简介",
          history: "0215415",
          author: "张三",
          year: "1940",
          vision: "鈐印本",
          source: "松蔭軒藏印譜文獻",
          view: "/pic/1.png",
        },
        {
          id: 12433,
          name: "名称",
          des: "印谱简介印谱简介印谱简介印谱简介印谱简介印谱简介",
          history: "0215415",
          author: "张三",
          year: "1940",
          vision: "鈐印本",
          source: "松蔭軒藏印譜文獻",
          view: "/pic/1.png",
        },
        {
          id: 12434,
          name: "名称",
          des: "印谱简介印谱简介印谱简介印谱简介印谱简介印谱简介",
          history: "0215415",
          author: "张三",
          year: "1940",
          vision: "鈐印本",
          source: "松蔭軒藏印譜文獻",
          view: "/pic/1.png",
        },
        {
          id: 12435,
          name: "名称",
          des: "印谱简介印谱简介印谱简介印谱简介印谱简介印谱简介",
          history: "0215415",
          author: "张三",
          year: "1940",
          vision: "鈐印本",
          source: "松蔭軒藏印譜文獻",
          view: "/pic/1.png",
        },
      ],
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      console.log(111);
    },
    search() {
      console.log(111);
    },
    fileChange(e) {
      console.log(e);
      this.addStep = 2;
    },
  },
};
</script>
